<%include pub/head.html%>
</head>
  <body>
  <%include pub/nav.html%>
	<div class="xu-mian-panel" style="padding-top: 0">
    <div class="container">
    	<div class="row">
    		<div class="mw-all-bar">
    			<div class="myjob-title">
            <h2 style="float: left;">站内通知</h2>
            <%if(notices && notices.message){%>
            <span class="delete-all-notice" data-toggle="modal" data-target="#deleteAll"><i class="icon iconfont icon-delete_light"></i>清空所有</span>
            <%}%>
          </div>
          <%if(notices && notices.message){%>
          	<%for(let i = 0; i < notices.message.length;i++){ let messages = notices.message %>
          	<div class="user-notice-list" id="<%- messages[i]._id%>">
          		<div class="notice-top"><span class="title"><%= messages[i].title %></span> <span class="msg-time"><%= messages[i].createAt %></span><span class="delete-one-notice" nid="<%- messages[i]._id%>"><i class="icon iconfont icon-delete_light"></i> 删除</span></div>
          		<div class="notice-content"><%= messages[i].content %></div>
          	</div>
          	<%}%>
              <div class="no-notice" style="display: none;">暂无消息</div>
          <%}else{%>
          <div class="no-notice">暂无消息</div>
          <%}%>
    		</div>
    	</div>
    </div>
  </div>
  <%include pub/foot.html%>
  <div class="modal slide modal-small" id="deleteAll" tabindex="-1" role="dialog">
      <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 class="modal-title">提醒</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body delete-modal-body">
              确认要清空所有消息么？
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-danger" id="delete-all-btn">确认清空</button>
              <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
          </div>
      </div>
  </div>
  <div class="modal slide modal-small" id="deleteOne" tabindex="-1" role="dialog">
      <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 class="modal-title">提醒</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body delete-modal-body">
              <input type="hidden" id="onenoticeid">
              确认要删除此条消息么？
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-danger" id="delete-one-btn">删除</button>
              <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
          </div>
      </div>
  </div>
  <%include pub/script.html%>
  </body>
</html>